Skip to content

Conversation

@psavery
Copy link
Collaborator

@psavery psavery commented Nov 7, 2025

This adds the basic capabilities for units and unit conversion to the WPPF module, and a few initial examples, including for lattice parameters.

The lattice parameter lengths are automatically converted from nanometers to Angstroms for display (and back when the user modifies them).

It also adds Angstrom units to the lattice lengths, and degree units to the lattice angles.

We'll use this same infrastructure for other unit conversions.

Addresses part of: #1926

@psavery psavery requested a review from saransh13 November 7, 2025 00:36
@psavery psavery force-pushed the wppf-unit-conversions branch from f1ac0bd to 2631aed Compare November 11, 2025 00:09
@saransh13
Copy link
Member

the last change is to use scientific notation for the Shkl parameters. Other than that all numbers look good to me.

This adds the basic capabilities for units and unit conversion to the
WPPF module, and a few initial examples, including for lattice parameters.

The lattice parameter lengths are automatically converted from nanometers
to Angstroms for display (and back when the user modifies them).

It also adds Angstrom units to the lattice lengths, and degree units to
the lattice angles.

We'll use this same infrastructure for other unit conversions.

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery force-pushed the wppf-unit-conversions branch from dec53f5 to e1ec5ad Compare December 1, 2025 18:40
This was the default formatting that Qt was using before for floats.

This keeps us from accidentally rounding smaller numbers to zero,
like the anisotropic broadening parameters, which are often on the
order of 1e-4.

Signed-off-by: Patrick Avery <[email protected]>
@psavery
Copy link
Collaborator Author

psavery commented Dec 1, 2025

the last change is to use scientific notation for the Shkl parameters. Other than that all numbers look good to me.

Done. I fixed the formatting of the floats to use what was being done before, which was actually correct (it displays 6 sig figs, and scientific notation if needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants